package com.sdx.console.activity.entity;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.beetl.sql.core.annotatoin.ColumnIgnore;
import org.beetl.sql.core.annotatoin.AutoID;
import org.beetl.sql.core.annotatoin.SeqID;
import org.apache.commons.lang3.StringUtils;
import com.ibeetl.admin.core.util.ValidateConfig;
import com.sdx.service.ConfigService;

import org.beetl.sql.core.TailBean;
import java.math.*;

import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity;

import org.beetl.sql.core.annotatoin.InsertIgnore;
import org.beetl.sql.core.annotatoin.Version;
import org.beetl.sql.core.annotatoin.LogicDelete;
import com.sdx.common.utils.Utils;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

/* 
* 
* gen by Spring Boot2 Admin 2019-05-24
*/
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
@Data
public class ActivityComment extends BaseEntity{

    //留言id
    @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
    @AutoID	
    private Integer commentId ;
	
    //活动id
    private Integer actId ;
	
    //活动类型
    private Integer actType ;
	
    //会员id
    private String customerId ;
	
    //留言时间
    private Date commentTime ;
	
    //留言日期 20190523
    private Integer commentDay ;
	
    //显示状态 1、显示，0、不显示
    private Integer displayFlag ;
	
    //处理人
    private Integer handleId ;
	
    //处理人名称
    private String handleName ;
	
    //处理意见
    private String handleMemo ;
	
    //处理时间
    private Date handleTime ;

    private String actName;

    private String customerName;
	
	@ColumnIgnore
	@JsonIgnore
	private String commentTimeQuery;
	@ColumnIgnore
	@JsonIgnore
	private Date commentTimeStart;
	@ColumnIgnore
	@JsonIgnore
	private Date commentTimeEnd;
	public String getCommentTimeQuery(){
		return  commentTimeQuery;
	}
	public void setCommentTimeQuery(String commentTimeQuery ){
		this.commentTimeQuery = commentTimeQuery;
		Date[] timePair = Utils.parseQueryTime(commentTimeQuery);
		if (timePair!=null && timePair[0]!=null) {
			this.commentTimeStart = timePair[0];
		}
		if (timePair!=null && timePair.length==2 && timePair[1]!=null) {
			this.commentTimeEnd = timePair[1];
		}

	}
	public Date getCommentTimeStart(){
		return  commentTimeStart;
	}
	public void setCommentTimeStart(Date commentTimeStart ){
		this.commentTimeStart = commentTimeStart;
	}
	public Date getCommentTimeEnd(){
		return  commentTimeEnd;
	}
	public void setCommentTimeEnd(Date commentTimeEnd ){
		this.commentTimeEnd = commentTimeEnd;
	}

}
